{extend name="ashippingterminal/Public/base" /}
{block name="container"}
<div class="page-heade clearfix">
    <h2 class="clearfix text-center">
        <a class="col-md-3 title_color H_right" style="font-size: 16px;color:#333;" href="{:url('ashippingterminal/query')}">所有导购销售目标查询</a>
        <a class="col-md-3 title_color H_right" style="font-size: 16px;color:#333" href="{:url('ashippingterminal/index')}">所有导购销售目标管理</a>
        <a class="col-md-3 title_color H_right H_active" style="font-size: 16px;"  href="{:url('ashippingterminal/statistics')}">所有导购销售目标统计</a>
        <a class="col-md-3 title_color" style="font-size: 16px;color:#333;"  href="{:url('ashippingterminal/notarget')}">所有未设置目标的导购名单</a>
    </h2>
</div>
<form action="" class="form-inline" id="form1" method="post">
    <table class="table table-bordered bud_hei">
        <tr>
            <td class="text-right">姓名：</td>
            <td><input type="text" name="c.name" class="form-control" value="<?php if(isset($where['c_name'])) echo $where['c_name']; ?>"></td>
            <td class="text-right">身份证号：</td>
            <td><input type="text" class="form-control" name="c.IDNo" value="<?php if(isset($where['c_IDNo'])) echo $where['c_IDNo']; ?>"></td>
            <td class="text-right">所属品牌：</td>
            <td><input type="text" name="k.brand_name" class="form-control" value="<?php if(isset($where['k_brand_name'])) echo $where['k_brand_name']; ?>"></td>
            <td class="text-right">所属品类：</td>
            <td><input type="text" name="l.category_name" class="form-control" value="<?php if(isset($where['l_category_name'])) echo $where['l_category_name']; ?>"></td>
        </tr>
        <tr>
            <td class="text-right">营销分区：</td>
            <td><input type="text" name="pa.title" class="form-control" value="<?php if(isset($where['pa_title'])) echo $where['pa_title']; ?>"></td>
            <td class="text-right">营销省份：</td>
            <td><input type="text" class="form-control" name="na.title" value="<?php if(isset($where['na_title'])) echo $where['na_title']; ?>"></td>
            <td class="text-right">营销城市：</td>
            <td><input type="text" name="oa.title" class="form-control" value="<?php if(isset($where['oa_title'])) echo $where['oa_title']; ?>"></td>
            <td class="text-right">经销商名称：</td>
            <td><input type="text" name="qa.title" class="form-control" value="<?php if(isset($where['qa_title'])) echo $where['qa_title']; ?>"></td>
        </tr>
        <tr>
            <td class="text-right">系统名称：</td>
            <td><input type="text" name="m.title" class="form-control" value="<?php if(isset($where['m_title'])) echo $where['m_title']; ?>"></td>
            <td class="text-right">网点名称：</td>
            <td><input type="text" class="form-control" name="j.title" value="<?php if(isset($where['j_title'])) echo $where['j_title']; ?>"></td>
            <td class="text-right">一级渠道：</td>
            <td><input type="text" name="n.title" class="form-control" value="<?php if(isset($where['n_title'])) echo $where['n_title']; ?>"></td>
            <td class="text-right">二级渠道：</td>
            <td><input type="text" name="p.title" class="form-control" value="<?php if(isset($where['p_title'])) echo $where['p_title']; ?>"></td>
        </tr>
        <tr>
            <td class="text-right">财年：</td>
            <td>
                <select name="b.year" id="year" class="form-control select">
                    <option value="">请选择</option>
                    <option value="2011">2011</option>
                    <option value="2012">2012</option>
                    <option value="2013">2013</option>
                    <option value="2014">2014</option>
                    <option value="2015">2015</option>
                    <option value="2016">2016</option>
                    <option value="2017">2017</option>
                    <option value="2018">2018</option>
                    <option value="2019">2019</option>
                    <option value="2020">2020</option>
                    <option value="2021">2021</option>
                    <option value="2022">2022</option>
                    <option value="2023">2023</option>
                    <option value="2024">2024</option>
                    <option value="2025">2025</option>
                    <option value="2026">2026</option>
                    <option value="2027">2027</option>
                    <option value="2028">2028</option>
                    <option value="2029">2029</option>
                </select>
                <script>
                    $('#year').val("<?php if(isset($where['b_year'])) echo $where['b_year']; ?>")
                </script>
            </td>
            <td class="text-right">一级考核期：</td>
            <td>
                <select name="a.kh1" id="kh1" class="form-control select">
                    <option value="">请选择</option>
                    {volist name="kh1" id="vo1"}
                    <option value="{$vo1}">{$vo1}</option>
                    {/volist}
                </select>
                <script>
                    $('#kh1').val("<?php if(isset($where['a_kh1'])) echo $where['a_kh1']; ?>")
                </script>
            </td>
            <td class="text-right">二级考核期：</td>
            <td>
                <select name="a.kh2" id="kh2" class="form-control select">
                    <option value="">请选择</option>
                    {volist name="kh2" id="vo2"}
                    <option value="{$vo2}">{$vo2}</option>
                    {/volist}
                </select>
                <script>
                    $('#kh2').val("<?php if(isset($where['a_kh2'])) echo $where['a_kh2']; ?>")
                </script>
            </td>
            <td class="text-right">是否显示产品维度：</td>
            <td>
                <select name="z.cp_dimension" id="cp_dimension" class="form-control select">
                    <option value="">请选择</option>
                    <option value="0">否</option>
                    <option value="1">是</option>
                </select>
                <script>
                    $('#cp_dimension').val("<?php if(isset($where['z_cp_dimension'])) echo $where['z_cp_dimension']; ?>")
                </script>
            </td>
        </tr>
        <tr>
            <td class="text-right">销售品牌：</td>
            <td><input type="text" class="form-control" name="i.brand_name" value="<?php if(isset($where['i_brand_name'])) echo $where['i_brand_name']; ?>"></td>
            <td colspan="6"></td>
        </tr>
        <tr>
            <td colspan="8" class="text-center">
                <button class="btn-sm btn-info btn" type="submit">查询</button><span class="lr_5"></span><button class="btn-sm btn-info btn" type="reset" id="reset">清空查询条件</button> <span class="lr_5"></span><a href="javascript:;" class="btn btn-sm btn-info"  onclick='window.open("/index/ashippingterminal/exportStatistics","_self");'>导出Excel</a>
            </td>
        </tr>
    </table>
</form>
<table class="table table-striped table-bordered table-hover bud_hei text-center">
    <tr class="info">
        <td rowspan="2">N0.</td>
        <td rowspan="2">明细编号</td>
        <td colspan="11">目标信息</td>
        <td colspan="7">导购基本信息</td>
        <td colspan="4">所属主网点信息</td>
        <td colspan="2">所属品牌/品类</td>
        <td colspan="2">网点所属渠道</td>
        <td colspan="9">主网点所属情况</td>
        <td colspan="6">网点所属负责人</td>
    </tr>
    <tr class="info">
        <td class="warning">导购员</td>
        <td>财年</td>
        <td>一级考核期</td>
        <td>二级考核期</td>
        <td>销售网点</td>
        <td>销售品牌</td>
        <td>销售品类</td>
        <td>销售系列</td>
        <td>销售SKU</td>
        <td>销售单品</td>
        <td>目标金额(元)</td>
        <td>导购工号</td>
        <td>导购身份证</td>
        <td>岗位类型</td>
        <td>导购等级</td>
        <td>入职时间</td>
        <td>离职时间</td>
        <td>手机号</td>
        <td>网点编号</td>
        <td class="warning">网点名称</td>
        <td>系统自编店号</td>
        <td>是否直营</td>
        <td>品牌</td>
        <td>品类</td>
        <td>一级渠道</td>
        <td>二级渠道</td>
        <td>网点所属<br>行政省份</td>
        <td>网点所属<br>行政城市</td>
        <td>网点所属<br>营销分区</td>
        <td>网点所属<br>营销省份</td>
        <td>网点所属<br>营销城市</td>
        <td>网点所属<br>经销商编号</td>
        <td>网点所属<br>经销商</td>
        <td>网点所属<br>系统编号</td>
        <td>网点所属<br>系统</td>
        <td>分区经理</td>
        <td>省份经理</td>
        <td>城市经理</td>
        <td>经销商负责人</td>
        <td>系统负责人</td>
        <td>网点负责人</td>
    </tr>
    {notempty name="data"}
    {volist name="data" id="list"}
    <tr>
        <td>{$i}</td>
        <td>{$list.info_no}</td>
        <td>{$list.name}</td>
        <td>{$list.year}</td>
        <td>{$list.kh1}</td>
        <td>{$list.kh2}</td>
        <td>{$list.wd}</td>
        <td>{$list.pp}</td>
        <td>{$list.pl}</td>
        <td>{$list.xl}</td>
        <td>{$list.sku}</td>
        <td>{$list.pro_name}</td>
        <td>{$list.money}</td>
        <td>{$list.workNumber}</td>
        <td>{$list.IDNo}</td>
        <td>{$list.postType}</td>
        <td>{$list.guideGrade}</td>
        <td>{$list.entryDate}</td>
        <td>{$list.justDate}</td>
        <td>{$list.phone}</td>
        <td>{$list.wangdianno}</td>
        <td>{$list.wangdian}</td>
        <td>{$list.mysn}</td>
        <td>{$list.direct}</td>
        <td>{$list.pinpai}</td>
        <td>{$list.pinlei}</td>
        <td>{$list.yj}</td>
        <td>{$list.ej}</td>
        <td>{$list.s}</td>
        <td>{$list.shi}</td>
        <td>{$list.yq}</td>
        <td>{$list.ys}</td>
        <td>{$list.yshi}</td>
        <td>{$list.jxs_no}</td>
        <td>{$list.jxs}</td>
        <td>{$list.xt_no}</td>
        <td>{$list.xt}</td>
        <td>{$list.pr}</td>
        <td>{$list.nr}</td>
        <td>{$list.ab}</td>
        <td>{$list.jxsfz}</td>
        <td>{$list.xtfz}</td>
        <td>{$list.wdfz}</td>
    </tr>
    {/volist}
</table>
    <h5 class="text-center" style="font-size: 13px;font-weight: 500">
        总共有{$count}条记录，第{$page}/{$maxpage}页,当前页<input id="page" name="pages" type="text" style="width: 40px" value="1"/>
        <button id="gopage">Go</button>&nbsp;&nbsp;<button
            id="fistpage" onclick="$('#form1').find('input').val('');">首页</button>&nbsp;&nbsp;
        每页显示
        <select id="pagesize" name="limts">
            <option value='10' selected>10条</option>
            <option value='15'>15条</option>
            <option value='20'>20条</option>
        </select>
        <script>
            $('#pagesize').val("{$limit}");
        </script>
    </h5>
    {else /}
</table>
    <h3 class="text-center"><img src="__STATIC__/layout/img/zwsj.png"></h3>
    {/notempty}
</form>
<script>

    $(document).ready(function () {
        $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })

</script>
{/block}
